home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1998 August / PC Plus SuperCD 50a Issue 142 (CD142a) (August 1998).iso / trial / demon / TURNPIKE.1 / UNIVERSE.MDM < prev    next >
Encoding:
Text File  |  1997-12-04  |  8.9 KB  |  331 lines

  1. ;==JiEyt0igtZWQZq4Q+JC5EQ== UNIVERSE.MDM  4 Dec 1997 14:17:36
  2. IDENT   Universal modem script
  3. ;
  4. ; We advise you NOT to edit this file.
  5. ;
  6. ; Should you wish to alter the way in which your modem is driven then
  7. ; you should in the first instance use a specific modem driver file.
  8. ; Instructions for selecting a new modem file can be found in the Help
  9. ; for the Connect program.
  10. ;
  11. ; If no specific file is available then you can use a "generic" modem
  12. ; driver file - again the Help will guide you in your choice.
  13. ;
  14. ; If you wish to customize the modem driving still further then you
  15. ; may edit one of the specific or generic files. You will find that
  16. ; they contain considerable information to guide you.
  17. ;
  18. ; Editing this file is unnecessarily complex and may prevent you using
  19. ; it in the future with other modems. Please follow our advice!
  20. ;
  21. SET COMSPEED=57600
  22. ;
  23. ; INITIALISE
  24. ;
  25.    RESET 1
  26.    WAIT 2
  27.    ;
  28.    ; See if the modem is there at all
  29.    ;
  30.    SEND 'AT\r'
  31.    ;
  32.    SELECT 3 'Modem not responding'
  33.       CASE 'OK'
  34.          TEXT 'Modem is responding...'
  35.    ENDSELECT
  36.    ;
  37.    SHOW OFF
  38.    ;
  39.    ; Try to deal specially with any Multitech modem
  40.    ;
  41.    ; First say use factory defaults and then set to factory defaults
  42.    ;
  43.    SEND 'AT&F8&F\r'
  44.    SELECT 3 'Modem not responding'
  45.       CASE 'OK'
  46.          ; Try to make the Multitech specific settings
  47.          SEND 'ATQ0X4&E4&E13&C1&D3%E0S0=0&Q0\r'
  48.          SELECT 3 'Modem not responding'
  49.             CASE 'OK'
  50.                NOTE 'Multitech modem recognised and initialised'
  51.                JUMP INITDONE
  52.             CASE 'ERROR'
  53.                NOTE 'Probably not a Multitech'
  54.          ENDSELECT
  55.       CASE 'ERROR'
  56.          NOTE 'Probably not a Multitech'
  57.    ENDSELECT
  58.    ;
  59.    ; Set factory defaults,
  60.    ; use factory profile 1 for hardware flow control, if available
  61.    ; otherwise use profile 0
  62.    ;
  63.    SEND 'AT&F1\r'
  64.    SELECT 3 'Modem not responding'
  65.       CASE 'OK'
  66.          ; Profile 1 accepted, make sure that it is a USR or clone
  67.          SEND 'AT&B1&H1&K2&M4&R2\r'
  68.          SELECT 3 'Modem not responding'
  69.             CASE 'OK'
  70.                NOTE 'Factory profile 1 loaded for USR hardware flow control'
  71.             CASE 'ERROR'
  72.                SEND 'AT&F\r'
  73.                SELECT 3 'Modem not responding'
  74.                   CASE 'OK'
  75.                      NOTE 'Factory profile 0 loaded'
  76.                   CASE 'ERROR'
  77.                      NOTE 'Cannot set factory profile'
  78.                      FAIL
  79.                ENDSELECT
  80.          ENDSELECT
  81.       CASE 'ERROR'
  82.          SEND 'AT&F\r'
  83.          SELECT 3 'Modem not responding'
  84.             CASE 'OK'
  85.                NOTE 'Factory profile 0 loaded'
  86.             CASE 'ERROR'
  87.                NOTE 'Cannot set factory profile'
  88.                FAIL
  89.          ENDSELECT
  90.    ENDSELECT
  91.    ;
  92.    ; Try to get DCD to show state of carrier
  93.    ;
  94.    SEND 'AT&C1\r'
  95.    SELECT 3 'Modem not responding'
  96.       CASE 'OK'
  97.          NOTE 'DCD will reflect state of carrier'
  98.       CASE 'ERROR'
  99.          NOTE 'DCD might not reflect the state of carrier'
  100.          NOTE 'Connect may not be able to recognise if the line drops'
  101.    ENDSELECT
  102.    ;
  103.    ; Try to get modem to hangup when DTR is toggled
  104.    ; if possible reset as well when DTR toggled
  105.    ;
  106.    SEND 'AT&D3\r'
  107.    SELECT 3 'Modem not responding'
  108.       CASE 'OK'
  109.          NOTE 'DTR will make modem reset'
  110.       CASE 'ERROR'
  111.          SEND 'AT&D2\r'
  112.          SELECT 3 'Modem not responding'
  113.             CASE 'OK'
  114.                NOTE 'DTR will make modem hang up'
  115.             CASE 'ERROR'
  116.                NOTE 'Modem might not hang up if +++ escape is not recognised'
  117.          ENDSELECT
  118.    ENDSELECT
  119.    ;
  120.    ; Try to prevent modem answering incoming calls
  121.    ;
  122.    SEND 'ATS0=0\r'
  123.    SELECT 3 'Modem not responding'
  124.       CASE 'OK'
  125.          NOTE 'Auto-answer disabled'
  126.       CASE 'ERROR'
  127.          NOTE 'Modem might answer before dialing or after hangup'
  128.    ENDSELECT
  129.    ;
  130.    ; Check for special modems by their ATI response
  131.    ;
  132.    SEND 'ATI3\r'
  133.    SELECT 3 'Modem not responding'
  134.       CASE ' 68356 '
  135.          ; Try to make the Motorola 68345 specific settings
  136.          SEND 'ATY0&R0\\V4\r'
  137.          SELECT 3 'Modem not responding'
  138.             CASE 'OK'
  139.                NOTE 'Motorola 68356 based modem recognised and initialised'
  140.                JUMP INITDONE
  141.             CASE ERROR
  142.                NOTE 'Probably not a Motorola 3400'
  143.          ENDSELECT
  144.       CASE ' Mwave '
  145.          ; Try to make the IBM Mwave specific settings
  146.          SEND 'ATW1\\V1\r'
  147.          SELECT 3 'Modem not responding'
  148.             CASE 'OK'
  149.                NOTE 'IBM Mwave based modem recognised and initialised'
  150.                JUMP INITDONE
  151.             CASE ERROR
  152.                NOTE 'Probably not an IBM Mwave'
  153.          ENDSELECT
  154.       CASE 'ERROR'
  155.          SEND 'ATI2\r'
  156.          SELECT 3 'Modem not responding'
  157.             CASE ' GSM:DP'
  158.                ; Try to make Nokia data card specific settings
  159.                SEND 'ATS34=2\r'
  160.                SELECT 3 'Modem not responding'
  161.                   CASE 'OK'
  162.                      NOTE 'Nokia data card modem recognised and initialised'
  163.                      JUMP INITDONE
  164.                CASE ERROR
  165.                   NOTE 'Probably not a Nokia'
  166.             ENDSELECT
  167.          CASE 'OK'
  168.          CASE 'ERROR'
  169.          ENDSELECT
  170.       CASE 'OK'
  171.          SEND 'ATI4\r'
  172.          SELECT 3 'Modem not responding'
  173.             CASE 'UMC '
  174.                ; UMC V.32bis/FAX/VOICE has W1 set, must avoid setting S95
  175.                NOTE 'UMC based modem recognised and initialised'
  176.                JUMP INITDONE
  177.             CASE 'OK'
  178.             CASE 'ERROR'
  179.          ENDSELECT
  180.    ENDSELECT
  181.    ;
  182.    ; Try to make modem show extended CONNECT responses
  183.    ;
  184.    ; First use the older Rockwell like method
  185.    ;
  186.    SEND 'ATS95=46\r'
  187.    SELECT 3 'Modem not responding'
  188.       CASE 'OK'
  189.          NOTE 'Extended responses enabled'
  190.       CASE 'ERROR'
  191.          NOTE 'Probably not a Rockwell modem'
  192.    ENDSELECT
  193.    ;
  194.    ; Now use the AT&T HMS like method
  195.    ;
  196.    SEND 'ATW1\r'
  197.    SELECT 3 'Modem not responding'
  198.       CASE 'OK'
  199.          NOTE 'Extended responses enabled'
  200.       CASE 'ERROR'
  201.          NOTE 'Probably not an AT&T HMS modem'
  202.    ENDSELECT
  203.    ;
  204.    ; Now use the newer Rockwell like method
  205.    ;
  206.    SEND 'AT\\V1\r'
  207.    SELECT 3 'Modem not responding'
  208.       CASE 'OK'
  209.          NOTE 'Extended responses enabled'
  210.       CASE 'ERROR'
  211.          NOTE 'Probably not a newer Rockwell modem'
  212.    ENDSELECT
  213.    ;
  214.    ; If all three of the above fail ERROR
  215.    ; then the modem might only show basic CONNECT response
  216.    ;
  217.    ; Deal specially with the BT Ignition or Motorola BitSurfr ISDN TA
  218.    ;
  219.    SEND 'AT%A2=95\r'
  220.    SELECT 3 'Modem not responding'
  221.       CASE 'OK'
  222.          NOTE 'Async-to-sync PPP selected'
  223.       CASE 'ERROR'
  224.          NOTE 'Probably not a BT Ignition'
  225.    ENDSELECT
  226.    ;
  227.    ENDJUMP INITDONE
  228.    ;
  229.    SHOW ON
  230.    ;
  231.    TEXT 'Ready to dial...'
  232. ;
  233. PULSE
  234.    TEXT 'Pulse...'
  235.    WAIT 1
  236.    SEND "ATDP%pabx%"
  237.    ;
  238.    ; Sent:
  239.    ;  DP     - Pulse dial
  240.    ;
  241.    WAIT 1 "%pabx%"
  242.    SHOW OFF
  243.    SEND "%carrier%"
  244.    WAIT 1 "%carrier%"
  245.    SHOW ON
  246.    SEND "%phone%\r"
  247.    WAIT 1 "%phone%\r"
  248.    REPORT ON
  249.    SELECT 60 'Failed to connect'
  250.       CASE 'CONNECT'
  251.          NOTE 'Connected successfully'
  252.       CASE 'BUSY'
  253.          NOCHARGE
  254.          NOTE 'Remote modem is giving a busy signal'
  255.          FAIL
  256.       CASE 'NO ANSWER'
  257.          NOCHARGE
  258.          NOTE 'Remote modem was ringing but did not answer the call'
  259.          FAIL
  260.       CASE 'NO CARRIER'
  261.          NOTE 'Failed to connect'
  262.          FAIL
  263.       CASE 'NO DIALTONE'
  264.          NOCHARGE
  265.          TEXT 'No dial tone, so cannot dial'
  266.          FAIL
  267.       CASE 'NO DIAL TONE'
  268.          NOCHARGE
  269.          TEXT 'No dial tone, so cannot dial'
  270.          FAIL
  271.    ENDSELECT
  272. ;
  273. TONE
  274.    TEXT 'Tone...'
  275.    WAIT 1
  276.    SEND "ATDT%pabx%"
  277.    ;
  278.    ; Sent:
  279.    ;  DT     - Touch-Tone dial
  280.    ;
  281.    WAIT 1 "%pabx%"
  282.    SHOW OFF
  283.    SEND "%carrier%"
  284.    WAIT 1 "%carrier%"
  285.    SHOW ON
  286.    SEND "%phone%\r"
  287.    WAIT 1 "%phone%\r"
  288.    REPORT ON
  289.    SELECT 60 'Failed to connect'
  290.       CASE 'CONNECT'
  291.          NOTE 'Connected successfully'
  292.       CASE 'BUSY'
  293.          NOCHARGE
  294.          NOTE 'Remote modem is giving a busy signal'
  295.          FAIL
  296.       CASE 'NO ANSWER'
  297.          NOCHARGE
  298.          NOTE 'Remote modem was ringing but did not answer the call'
  299.          FAIL
  300.       CASE 'NO CARRIER'
  301.          NOTE 'Failed to connect'
  302.          FAIL
  303.       CASE 'NO DIALTONE'
  304.          NOCHARGE
  305.          TEXT 'No dial tone, so cannot dial'
  306.          FAIL
  307.       CASE 'NO DIAL TONE'
  308.          NOCHARGE
  309.          TEXT 'No dial tone, so cannot dial'
  310.          FAIL
  311.    ENDSELECT
  312. ;
  313. HANGUP
  314.    TEXT 'Hanging up the phone...'
  315.    WAIT 2
  316.    SEND '+++'
  317.    ;
  318.    ; Sent:
  319.    ;  +++    - Return to command mode
  320.    ;
  321.    WAIT 2
  322.    SEND 'ATH\r'
  323.    ;
  324.    ; Sent:
  325.    ;  H      - Hang up (go on hook)
  326.    ;
  327.    WAIT 1
  328.    RESET 1
  329. ;
  330. ; ** ends
  331.